package com.cloud.salon.gateway.feign;

import com.cloud.salon.common.base.entity.authority.Authority;
import com.cloud.salon.common.base.response.Res;
import com.cloud.salon.common.base.entity.authority.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Description 验证微服务feign
 * @Author wolf--LZH
 * @CreateDate 2019/5/7 0007 下午 3:33
 */
@FeignClient(value = "salon-authority")
public interface UserFeign {

    @PostMapping(value = "/user/findByUsername")
    Res<User> findByUsername(@RequestBody String username);

    @PostMapping(value = "/authority/findByUser")
    Res<List<Authority>> findAuthorityByUser(@RequestBody Integer userId);
}
